﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="website_admin_knowlegebase_newseditor" Codefile="newseditor.aspx.cs" %>

<%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title></title>

    <script type="text/javascript" src="../_static/_jQuery/jquery-1.3.2.min.js"></script>

    <script type="text/javascript" src="../../admin/_static/_jQuery/jquery_validator.js"></script>

    <script type="text/javascript" language="javascript" src="../_common/scripts/util.js"></script>

    <script language="javascript" src="../_static/_jQuery/jquery-fileupload.js" type="text/javascript"></script>

    <script language="javascript" src="../_static/_jQuery/interface.js" type="text/javascript"></script>

    <link href="../_common/styles/form_v2_0.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        $(document).ready(setup);
        function setup() {
            validator.setup("#crmForm");
            SwitchSourceType();
        }
        function Cancel() {
            window.close();
        }
        function SwitchSourceType() {
            if ($("#cbxSourceType").attr("checked")) {
                $("#trLink").css("display", "");
                $("#trContent").css("display", "none");
            }
            else {
                $("#trContent").css("display", "");
                $("#trLink").css("display", "none");
            }
        }
    </script>

</head>
<body scrool="no" style="margin: 0px; padding: 0px; background: #F0F0F0;">

    <script type="text/javascript">
    <!--
        function ___doPostBack(eventTarget) {
            var theForm = document.forms["crmForm"];
            if (!theForm) {
                theForm = document.crmForm;
            }
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                theForm.___EVENTTARGET.value = eventTarget;
                theForm.submit();
            }
        }
    // -->
    </script>

    <div id="success" style="position: absolute; z-index: 300; height: 130px; width: 284px;
        left: 50%; top: 50%; margin-left: -150px; margin-top: -80px;">
        <div style="position: absolute; z-index: 300; width: 270px; height: 90px; background-color: #FFFFFF;
            border: solid #6699CC 1px; font-size: 14px;">
            <div style="height: 64px; line-height: 150%; padding: 0px 3px 0px 3px;" align="center">
                <br />
                <table>
                    <tr>
                        <td valign="top">
                            <img border="0" src="../_imgs/admin/progress.gif" />
                        </td>
                        <td valign="middle" style="font-size: 14px; width: 150px;">
                            Loading ...<br />
                        </td>
                    </tr>
                </table>
                <br />
            </div>
        </div>
        <div style="position: absolute; width: 270px; height: 108px; z-index: 299; left: 4px;
            top: 5px; background-color: #E8E8E8; border: #E8E8E8 1px solid; display: none;">
        </div>
    </div>

    <script type="text/javascript">
        document.getElementById("success").style.display = "none"; 
    </script>

    <script src="../../admin/_static/_common/scripts/divcover.js" type="text/javascript"></script>

    <form id="crmForm" runat="server">
    <input type="hidden" name="___EVENTTARGET" id="___EVENTTARGET" value="" />
    <input type="hidden" class="tbxReadOnly" id="txtStockAmount" name="txtStockAmount"
        value="0" runat="server" />
    <table cellpadding="0" cellspacing="0" class="WIN-Form-Layout">
        <tr style="height: 32px;">
            <td colspan="1" class="WIN-Form-Title-Bar">
                <span>News Editor</span>
            </td>
        </tr>
        <tr style="height: 100%; background: #ffffff;">
            <td valign="top" style="padding: 10px 10px 10px 0px;">
                <div class="content">
                    <div class="checkoutBox noBorder" id="errorMsg" runat="server" style="background: #FFFDCF;
                        width: 762px; line-height: 21px; padding: 10px;" visible="false">
                    </div>
                    <div class="checkoutBox noBorder">
                        <div class="tabContainer">
                            <ul class="tabHead">
                                <li class="currentBtn"><a id="a21" href="javascript:void(0);" onclick="tab_switch(this);"
                                    title="General" rel="21">General</a></li>
                            </ul>
                        </div>
                        <div class="clear">
                        </div>
                        <ul class="infoList edit" id="tab_21">
                            <li style="width: 100%; height: auto;">
                                <table cellpadding="1" cellspacing="5" style="border: 0px; table-layout: fixed; width: 860px;
                                    font-size: 12px;">
                                    <colgroup>
                                        <col style="width: 115px; text-align: right;" />
                                        <col />
                                        <col style="width: 85px; text-align: right;" />
                                        <col />
                                    </colgroup>
                                    <tbody>
                                        <tr valign="top">
                                            <td>
                                                Title:
                                            </td>
                                            <td colspan="3">
                                                <input type="text" class="tbxReadOnly" id="txtTitle" name="txtTitle" runat="server"
                                                    required="required" controlname="Title" isvalidator />
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td>
                                                Content Type:
                                            </td>
                                            <td>
                                                <input type="checkbox" id="cbxSourceType" name="cbxSourceType" runat="server" onclick="SwitchSourceType(this);"
                                                    style="float: left;" /><label for="cbxSourceType" style="width: auto; float: left;">Link</label>
                                            </td>
                                            <td>
                                                Sort NO.:
                                            </td>
                                            <td>
                                                <input type="text" class="tbxReadOnly" id="txtArticleNumber" name="txtArticleNumber" value="AUTO" style="width: 120px;" runat="server" required="required" controlname="Sort NO." isvalidator />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Source:
                                            </td>
                                            <td colspan="3">
                                                <input type="text" id="txtAuthor" class="tbxReadOnly" runat="server" value="brighterfutureled.com"
                                                    style="width: 300px;" />
                                            </td>
                                        </tr>
                                        <tr valign="top" id="trLink">
                                            <td>
                                                Link URL:
                                            </td>
                                            <td colspan="3">
                                                <input type="text" class="tbxReadOnly" id="txtNewsURL" name="txtNewsURL" runat="server" />
                                            </td>
                                        </tr>
                                        <tr valign="top" id="trContent">
                                            <td>
                                                Content:
                                            </td>
                                            <td colspan="3">
                                                <CE:Editor ID="txtContent" runat="server" AutoConfigure="Full" Width="100%" Height="380px"
                                                    CustomCulture="en-US">
                                                </CE:Editor>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </li>
                        </ul>
                        <div class="clear">
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr style="height: 45px;">
            <td class="WIN-Form-Bottom">
                <input type="button" value="Save" id="btnSave" class="btn_s" onclick="if(validator.validatorAll()){this.disabled=true;success.style.display='block';HideOverSels('success');___doPostBack('save');}"
                    style="width: 120px; height: 25px; margin: 0px 5px;" />
                <input type="button" value="Cancel" id="btnCancel" class="btn_s" onclick="Cancel();"
                    style="height: 25px; width: 120px; margin: 0px 5px;" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
